package org.giovanolli.mumi.entities;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * The Class Movement.
 */
@Entity
@Table(name = "account_movement")
public class Movement extends IdentificableEntity {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -1177854176127600398L;

	/** The specialist fee. */
	@ManyToOne
	@JoinColumn(name = "specialist_fee")
	private SpecialistFee specialistFee;

	/** The date. */
	@Column(name = "date")
	private Date date;

	/** The fee. */
	@Column(name = "fee")
	private Double fee;

	/** The movement type. */
	@Enumerated(EnumType.STRING)
	@Column(name = "movement_type")
	private MovementType movementType;

	/** The attention type mode. */
	@Enumerated(EnumType.STRING)
	@Column(name = "attention_type_mode")
	private AttentionTypeMode attentionTypeMode;

	/** The month. */
	@Column(name = "month")
	private Integer month;

	/** The year. */
	@Column(name = "year")
	private Integer year;

	/** The patient. */
	@ManyToOne
	@JoinColumn(name = "patient_id")
	private Patient patient;

	/**
	 * Gets the attention type mode.
	 * 
	 * @return the attention type mode
	 */
	public AttentionTypeMode getAttentionTypeMode() {
		return attentionTypeMode;
	}

	/**
	 * Gets the date.
	 * 
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * Gets the fee.
	 * 
	 * @return the fee
	 */
	public Double getFee() {
		return fee;
	}

	/**
	 * Gets the month.
	 * 
	 * @return the month
	 */
	public Integer getMonth() {
		return month;
	}

	/**
	 * Gets the movement type.
	 * 
	 * @return the movement type
	 */
	public MovementType getMovementType() {
		return movementType;
	}

	/**
	 * Gets the patient.
	 * 
	 * @return the patient
	 */
	public Patient getPatient() {
		return patient;
	}

	/**
	 * Gets the specialist fee.
	 * 
	 * @return the specialist fee
	 */
	public SpecialistFee getSpecialistFee() {
		return specialistFee;
	}

	/**
	 * Gets the year.
	 * 
	 * @return the year
	 */
	public Integer getYear() {
		return year;
	}

	/**
	 * Sets the attention type mode.
	 * 
	 * @param attentionTypeMode
	 *            the new attention type mode
	 */
	public void setAttentionTypeMode(AttentionTypeMode attentionTypeMode) {
		this.attentionTypeMode = attentionTypeMode;
	}

	/**
	 * Sets the date.
	 * 
	 * @param date
	 *            the new date
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * Sets the fee.
	 * 
	 * @param fee
	 *            the new fee
	 */
	public void setFee(Double fee) {
		this.fee = fee;
	}

	/**
	 * Sets the month.
	 * 
	 * @param month
	 *            the new month
	 */
	public void setMonth(Integer month) {
		this.month = month;
	}

	/**
	 * Sets the movement type.
	 * 
	 * @param movementType
	 *            the new movement type
	 */
	public void setMovementType(MovementType movementType) {
		this.movementType = movementType;
	}

	/**
	 * Sets the patient.
	 * 
	 * @param patient
	 *            the new patient
	 */
	public void setPatient(Patient patient) {
		this.patient = patient;
	}

	/**
	 * Sets the specialist fee.
	 * 
	 * @param specialistFee
	 *            the new specialist fee
	 */
	public void setSpecialistFee(SpecialistFee specialistFee) {
		this.specialistFee = specialistFee;
	}

	/**
	 * Sets the year.
	 * 
	 * @param year
	 *            the new year
	 */
	public void setYear(Integer year) {
		this.year = year;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.giovanolli.mumi.entities.IdentificableEntity#toString()
	 */
	@Override
	public String toString() {
		return "Movement [date=" + date + ", fee=" + fee + "]";
	}
}
